package com.gds.wiki.cloud.memberCenter.client.member.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gds.wiki.cloud.framework.common.dto.ResponseDto;
import com.gds.wiki.cloud.memberCenter.client.member.hystrix.MemberApiFallbackFactory;
import com.gds.wiki.cloud.memberCenter.client.member.model.Member;
import com.gds.wiki.cloud.memberCenter.client.member.model.query.MemberQuery;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "gds-member-provider",path = MemberApi.mapping,fallbackFactory = MemberApiFallbackFactory.class)
public interface MemberApi {

    static String mapping="/api/member";
    @PostMapping
    ResponseDto<Member> getMember(@RequestBody MemberQuery memberQuery);

    @PostMapping
    ResponseDto<Page> getPage(@RequestBody MemberQuery memberQuery);

}
